import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner price = new Scanner(System.in);
        int a = price.nextInt();
        if(a < 100){
            System.out.printf("%.1f",a);
        }else if(a >= 100 && a < 500){
            double b = a * 0.9;
            System.out.printf("%.1f",b);
        }else if(a >= 500 && a < 2000){
            double c = a * 0.8;
            System.out.printf("%.1f",c);
        }else if(a >= 2000 && a < 5000){
            double d = a * 0.7;
            System.out.printf("%.1f",d);
        }else{
            double e = a * 0.6;
            System.out.printf("%.1f",e);
        }
    }
}
